package com.cby.apt.sample;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.TextView;

import com.cby.android.annotation.Provider;
import com.cby.android.annotation.RouteAnnotation;
import com.cby.annotation.route.AnnotationRouteFinder;

//https://github.com/square/javapoet/
//https://www.jianshu.com/p/9616f4a462bd/

@RouteAnnotation(name = "RouteName_MainActivity")
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView showTv = findViewById(R.id.tv_show);
        Provider provider = new AnnotationRouteFinder();
        String activity = provider.getActivityRouteName("RouteName_SecondActivity");
        showTv.setText(activity);
    }
}